<template>
  <div>
    <a-card>
      <BaseForm :formOption="formOption"></BaseForm>
      <a-button @click="login">登录</a-button>
      <MySvg name="vue"></MySvg>
    </a-card>
  </div>
</template>

<script setup lang="ts">
import BaseForm from "@/components/BaseForm/index.vue";
import MySvg from "@/components/BaseTools/MySvg.vue";
import { formOption } from "./option.ts";
import { useUserStore } from "@/pinia/index.ts";
import { ref } from "vue";

const userStore = useUserStore();

const form = ref({
  username: 'admin',
  password: 'admin'
});

const login = async () => { 
  userStore.handlerLogin(form.value)
};
</script>

<style scoped></style>